import request from '@/config/axios'

// 机场档案 VO
export interface DocAirportVO {
  id: number // id
  name: string // 名称
  code: string // 三字代码
  simpleName: string // 简称
  city: string // 城市
}

// 机场档案 API
export const DocAirportApi = {
  // 查询机场档案分页
  getDocAirportPage: async (params: any) => {
    return await request.get({ url: `/pplan/doc-airport/page`, params })
  },

  // 查询机场档案详情
  getDocAirport: async (id: number) => {
    return await request.get({ url: `/pplan/doc-airport/get?id=` + id })
  },

  // 新增机场档案
  createDocAirport: async (data: DocAirportVO) => {
    return await request.post({ url: `/pplan/doc-airport/create`, data })
  },

  // 修改机场档案
  updateDocAirport: async (data: DocAirportVO) => {
    return await request.put({ url: `/pplan/doc-airport/update`, data })
  },

  // 删除机场档案
  deleteDocAirport: async (id: number) => {
    return await request.delete({ url: `/pplan/doc-airport/delete?id=` + id })
  },

  // 导出机场档案 Excel
  exportDocAirport: async (params) => {
    return await request.download({ url: `/pplan/doc-airport/export-excel`, params })
  }
}